import { expect } from "chai";
import { ethers } from "hardhat";
import * as hre from "hardhat";
import { ContractInfo } from "../utils/util_contractinfo";
import { ContractTool } from "../utils/util_contracttool";
describe("Greeter", () => {
  before("init", async () => {
      await ContractTool.DeployAll(hre);
    //测试准备
  })
  it("Should return the new greeting once it's changed", async () => {


    let greeter = await ContractInfo.getContract("Greeter");
    await ContractTool.CallState(greeter, "setGreeting", ["Hello, world!"]);
    expect(await greeter.greet()).to.equal("Hello, world!");


    await ContractTool.CallState(greeter, "setGreeting", ["Hola, mundo!"]);


    expect(await greeter.greet()).to.equal("Hola, mundo!");
  });
});
